<template>
  <div>
    <Child :title="title" id="100"></Child>
    <div>
      <button @click="title = 'world'">change title</button>
    </div>
    <div>
      {{ x }} - {{ y }}
    </div>
    <div>
      <button @click="change">change</button>
    </div>
  </div>
</template>

<script setup>
  import { ref, toRefs } from 'vue'
  import Child from './Child.vue'
  import useMessage from './useMessage.js'

  const { message, change } = useMessage()

  const { x, y } = toRefs(message)

  const title = ref('hello')
</script>

<style lang="less" scoped>

</style>
